<?php
if (isset($_POST['op']) &&  !empty($_POST['op']) ){
    include 'config.php';
    $openid=$_POST['op'];
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    $query=$mysqli->query("SELECT msg FROM isread where openid='".$openid."' limit 0,1 ");
    if($query->num_rows>0){
        $data=$query->fetch_assoc();
        echo json_encode(array('s'=>1,'d'=>json_decode($data['msg'],true)));
    }else{
        echo json_encode(array('s'=>666));
    }
    $mysqli->close();
    
}else{
    echo json_encode(array('s'=>666));
}

